/**
 * CopyRight © 2012 USTC SINOVATE SOFTWARE CO.LTD All Rights Reserved.
 */

package com.cmcc.zysoft.spring.security.jxl;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import org.apache.poi.ss.usermodel.Workbook;
import net.sf.jxls.transformer.XLSTransformer;

/**
 * @author 袁凤建
 * <br />邮箱: yuan.fengjian@ustcinfo.com
 * <br />描述: XLSTransformerExt.java
 * <br />版本: 1.0.0
 * <br />日期: 2013-9-29 下午2:59:59
 * <br />CopyRight © 2012 USTC SINOVATE SOFTWARE CO.LTD All Rights Reserved.
 */

public class XLSTransformerExt extends XLSTransformer {

	public void transformXLS(String srcFilePath, Map<String, Object> beanParams, OutputStream os) {
    	try {
	        InputStream is = new BufferedInputStream(new FileInputStream(srcFilePath));
	        Workbook workbook = transformXLS(is, beanParams);
	        workbook.write(os);
	        is.close();
    	} catch (Exception e) {
			e.printStackTrace();
		}
    }
}